package com.googlecode.bip.dao;

import com.googlecode.bip.dao.mysql.MySQLDAOFactory;

/**
 * DAO Factory
 */
public abstract class DAOFactory
{
    /** Create a DAOFactory */
    protected DAOFactory(){}

    // There will be a method for each DAO that can be
    // created. The concrete factories will have to
    // implement these methods.

    public abstract String getDefaultCharsetName();

    public abstract LocalDAO getLocalDAO();
    public abstract TopicDAO getTopicDAO();
    public abstract QuestionDAO getQuestionDAO();
    public abstract UserDAO getUserDAO();
    public abstract UserValueDAO getUserValueDAO();
    public abstract UserIgnoreQuestionDAO getUserIgnoreQuestionDAO();
    public abstract ReferentDAO getReferentDAO();
    // NO ReferentReferentViewDAO getReferentReferentViewDAO();
    public abstract UserReferentDAO getUserReferentDAO();

    public static DAOFactory getDAOFactory(/*int whichFactory*/)
    {
//      switch (whichFactory) {
//        case CLOUDSCAPE:
//            return new CloudscapeDAOFactory();
//        case ORACLE    :
//            return new OracleDAOFactory();
//        case SYBASE    :
//            return new SybaseDAOFactory();
//        ...
//        default           :
//            return null;
//      }

        return new MySQLDAOFactory();
    }
}
